<template>
  <div class="app-container">
    <el-form ref="form" :model="evaluate" label-width="120px">
      <el-form-item label="uid">
        <el-input v-model="evaluate.uid" />
      </el-form-item>
      <el-form-item label="targetId">
        <el-input v-model="evaluate.targetId" />
      </el-form-item>

      <el-form-item label="evaluate">
        <el-input type="textarea" v-model="evaluate.evaluate" />
      </el-form-item>

      <el-form-item>
        <el-button type="primary" @click="onSubmit">新增</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
import evaluateApi from "@/api/evaluate";
export default {
  data() {
    return {
      evaluate: {
        uid: "",
        targetId: "",
        evaluate: "",
      },
    };
  },
  created() {},
  methods: {
    onSubmit() {
      evaluateApi.addEvaluate(this.evaluate).then((resp) => {
        //提示信息
        this.$message({
          type: "success",
          message: "新增成功!",
        });
        //回到列表页面 路由跳转
        this.$router.push({ path: "/evaluate/list" });
      });
    },
  },
};
</script>

<style></style>
